#pragma once
#include <concepts>
#include <coroutine>
#include "awaiter.hh"

namespace wb
{
namespace concepts
{
// clang-format off
template <typename T>
concept executor = requires(T t, std::coroutine_handle<> h)
{
    { t.schedule() } -> wb::concepts::awaiter;
    { t.yield() } -> wb::concepts::awaiter;
    { t.resume(h) } -> std::same_as<void>;
};
// clang-format on
}  // namespace concepts
}  // namespace wb